import VueRouter from "vue-router";

const Home = () => import("../page/Home")
const My = () => import('../page/My')
const Login = () => import('../page/Login')
const Register = () => import('../page/Register')
const Main = () => import('../page/Main')
const StudentCourse = () => import('../page/Student/Course')
const Exam = () => import('../page/Student/Exam')
const Evaluate = () => import('../page/Student/Evaluate')
const CourseDetail = () => import('../page/CourseDetail')
const StudentChapter = () => import('../page/Student/Chapter')
const TeacherChapter = () => import('../page/Teacher/Chapter')
const Study = () => import('../page/Student/Study')
const TeachCourse = () => import('../page/Teacher/Course')
const TeacherManage = () => import('../page/Administrator/TeacherManage')
const StudentManage = () => import('../page/Administrator/StudentManage')
const EvaluateManage = () => import('../page/Administrator/EvaluateManage')
const TeachFeedback = () => import('../page/Teacher/TeachFeedback')
const TeachExam = () => import('../page/Teacher/TeachExam')
const Inspection = () => import('../page/Teacher/Inspection')
const ChapterEdit = () => import('../page/Teacher/ChapterEdit')
const Video = () => import('../page/Student/Video')
const Exercise = () => import('../page/Student/Exercise')
const CommonExhibition = () => import('@/page/Student/CommonExhibition')
const Examination = () => import('../page/Student/Exercise')
const TestBaseManage = () => import('../page/Teacher/TestBaseManage')
const CreateExercise = () => import('../page/Teacher/CreateExercise')
const PersonalInformation = () => import('@/components/PersonalInformation')
const ReadOver = () => import('@/page/Teacher/ReadOver')
const ScoreStatistic = () => import('@/page/Student/ScoreStatistic')
const TheoryStudy = () => import('@/page/Teacher/TheoryStudy')
const PerformanceEvaluation = () => import('@/page/PerformanceEvaluation')
const ClassPerformEval = () => import('@/page/ClassPerformEval')
const SimulationPerformance = () => import('@/page/Student/SimulationPerformance')
const EvaluateSystem = () => import('@/page/Administrator/EvaluateSystem')
const TopologyDiagram = () => import('@/page/Teacher/TopologyDiagram')
const Graphs = () => import('@/page/Teacher/Graphs')
// 创建并暴露一个路由器
const router = new VueRouter({
    mode: 'hash',
    routes: [
        {
            path: '/',
            component: Main,
            children: [
                {
                    path: 'home',
                    component: Home,
                },
                {
                    path: 'my',
                    component: My,
                    children: [
                        {
                            path: 'stu-course',
                            component: StudentCourse
                        },
                        {
                            path: 'exam',
                            component: Exam,
                        },
                        {
                            path: 'evaluate',
                            component: Evaluate
                        },
                        {
                            path: 'score-statistic',
                            component: ScoreStatistic
                        },
                        {
                            path: 'simulation-performance',
                            component: SimulationPerformance

                        },
                        {
                            path: 'individual-performance-evaluation',
                            component: PerformanceEvaluation
                        },
                        {
                            path: 'class-performance-evaluation',
                            component: ClassPerformEval
                        },
                        {
                            path: 'teacher-manage',
                            component: TeacherManage
                        },
                        {
                            path: 'student-manage',
                            component: StudentManage
                        },
                        {
                            path: 'evaluate-manage',
                            component: EvaluateManage
                        },
                        {
                            path: 'evaluate-system',
                            component: EvaluateSystem
                        },
                        {
                            path: 'inspection',
                            component: Inspection
                        },
                        {
                            path: 'teach-exam',
                            component: TeachExam
                        },
                        {
                            path: 'teach-course',
                            component: TeachCourse
                        },
                        {
                            path: 'teach-feedback',
                            component: TeachFeedback
                        },
                        {
                            path: 'topo',
                            component: TopologyDiagram,
                        },
                        {
                            path: 'graphs',
                            component: Graphs,
                        },
                        {
                            path: 'test-base-manage',
                            component: TestBaseManage
                        },
                        {
                            path: 'theory-study',
                            component: TheoryStudy
                        },
                    ]
                }
            ]
        },
        {
            path: '/login',
            name: 'login',
            component: Login
        },
        {
            path: '/register',
            name: 'register',
            component: Register
        },
        {
            path: '/detail',
            name: 'detail',
            component: CourseDetail,
            children: [
                {
                    path: 'stu-chapter',
                    component: StudentChapter,
                },
                {
                    path: 'teacher-chapter',
                    component: TeacherChapter,
                },
                {
                    path: 'exam',
                    component: Exam
                },
            ]
        },
        {
            path: '/study',
            name: 'study',
            component: Study,
            children: [
                {
                    path: 'video',
                    name: 'video',
                    component: Video
                },
                {
                    path: 'plan',
                    name: 'plan',
                    component: CommonExhibition
                },
                {
                    path: 'exercise',
                    name: 'exercise',
                    component: Exercise
                },

            ]
        },
        {
            path: '/chapter_edit',
            name: 'chapter_edit',
            component: ChapterEdit
        },
        {
            path: '/examination',
            name: 'examination',
            component: Examination
        },
        {
            path: '/create_exercise',
            name: 'create_exercise',
            component: CreateExercise
        },
        {
            path: '/personal',
            name: 'personal',
            component: PersonalInformation
        },
        {
            path: '/read-over',
            component: ReadOver
        },

    ]
})

export default router